package com.ning.common.web.exception;


import com.ning.common.web.response.ResultCode;
import lombok.Data;

/**
 * @Auther: ning(lc))
 * @Date: 2022/10/31-10-31-15:07
 * @Description：自定义异常
 */
@Data
public class CustomerException extends RuntimeException{
    private String message;
    private ResultCode resultCode; // 抛出的枚举对象
    public CustomerException(String message){
        super(message);
        this.message = message;
    }
    // throw new CustomerException(ResultCode.PARAM_IS_BLANK);
    public CustomerException(ResultCode resultCode){
        this.resultCode = resultCode;
    }
}
